package com.larry.design.creatation.factory.simpleFactory;

/**
 * @author larry
 * @Title: design-frame
 * @Package com.larry.design.creatation.factory.simpleFactory
 * @Description: 简单工厂
 * @date 8/31/213:36 PM
 */
public class HuaSimpleFactory {

    public AbstractCar newCar(String type){

        if ("audi".equals(type)){
            return new AudiCar();
        }else if ("bmw".equals(type)){
            return new BmwCar();
        }else {
            return null;
        }
    }

}
